-- GENERATED SPELL FOR [Shadowsworn Dreadweaver] --


function spell0_6009(pUnit, Event) --@Banish,n/a--
pUnit:FullCastSpellOnTarget(8994,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6009', 16000, 1)
end

function spell1_6009(pUnit, Event) --@Curse of Mending,n/a--
pUnit:FullCastSpellOnTarget(7098,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6009', 2000, 1)
end

function spell2_6009(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20825,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6009', 3000, 1)
end

function Sorts_6009(pUnit, Event)
local choix_sorts_6009 = math.random(0, 2)
if choix_sorts_6009 == 0 then
pUnit:RegisterEvent('spell0_6009', 1, 1)
end
if choix_sorts_6009 == 1 then
pUnit:RegisterEvent('spell1_6009', 1, 1)
end
if choix_sorts_6009 == 2 then
pUnit:RegisterEvent('spell2_6009', 1, 1)
end
end

function mob6009_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6009', math.random(1500, 3000), 1)
end

function mob6009_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6009_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6009_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6009, 1, 'mob6009_Action')
RegisterUnitEvent(6009, 2, 'mob6009_Leave')
RegisterUnitEvent(6009, 3, 'mob6009_Kill')
RegisterUnitEvent(6009, 4, 'mob6009_Die')
